<%@ page import="org.springframework.util.ClassUtils" %>
<%@ page import="com.opeace.PersonForm" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'personForm.label', default: 'PersonForm')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-personForm" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<h1>Form Added</h1>
		<table align="center" width="100%">
                  <tr>

		<td align="left" width="50%" style="vertical-align: top;">
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list personForm">
			
				<g:if test="${personFormInstance?.dateJoined}">
				<li class="fieldcontain">
					<span id="dateJoined-label" class="property-label"><g:message code="personForm.dateJoined.label" default="Date Joined" /></span>
					
						<span class="property-value" aria-labelledby="dateJoined-label"><g:formatDate date="${personFormInstance?.dateJoined}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${personFormInstance?.form}">
				<li class="fieldcontain">
					<span id="form-label" class="property-label"><g:message code="personForm.form.label" default="Form" /></span>
					
						<span class="property-value" aria-labelledby="form-label"><g:link controller="form" action="show" id="${personFormInstance?.form?.id}">${personFormInstance?.form?.name.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${personFormInstance?.person}">
				<li class="fieldcontain">
					<span id="person-label" class="property-label"><g:message code="personForm.person.label" default="Person" /></span>
					<g:set var="link" value="${createLink(controller: ClassUtils.getShortName(personFormInstance?.person?.getClass())[0].toLowerCase() + ClassUtils.getShortName(personFormInstance?.person?.getClass())[1..-1], action: 'show', id: personFormInstance?.person.id)}" />
                                        <div class="property-value"><a href="${link}">${personFormInstance?.person?.firstName} ${personFormInstance?.person?.lastName}</a></div>
					
				</li>
				</g:if>
                          
                                <g:if test="${personFormInstance?.information}">
				<li class="fieldcontain">
					<span id="information-label" class="property-label"><g:message code="personForm.information.label" default="Information" /></span>
					
						<span class="property-value" aria-labelledby="information-label"><g:fieldValue bean="${personFormInstance}" field="information"/></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${personFormInstance?.id}" />
					<g:link class="edit" style="font-size:17px;" action="edit" id="${personFormInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</td>
                  </tr>

	</table>
                <div class="nav" role="navigation">
			<ul>
				
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
</html>
